package com.fisionlabs.queue;

import java.util.LinkedList;
import java.util.Queue;

import jpcap.packet.Packet;

public class PacketQueue {
	public Queue<Packet> queue;
	
	private PacketQueue() {
		this.queue = new LinkedList<Packet>();
	}
	
	private static class PacketQueuenHolder { 
	    private final static PacketQueue INSTANCE = new PacketQueue();
	  }
	  
	public static PacketQueue getInstance() {
		return PacketQueuenHolder.INSTANCE;
	}
	  
	public void addPacket(Packet packet){
		this.queue.add(packet);
	}
	
	public Queue<Packet> getQueue() {
		return queue;
	}

	public void setQueue(Queue<Packet> queue) {
		this.queue = queue;
	}

}
